<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		
		<script>
			
			console.log("a="+a);
			var a = 10;
			console.log("a="+a);
			
			function fool()
			{
				console.log("fool() a="+a);
				//a = 20;//全局的a
				var a = 30;//内部定义了一个a
				console.log("fool() a="+a);
			}
			fool();
			
			console.log("a="+a);
			console.log("b="+b);
		</script>
	</body>
</html>
